<%-- 
    Document   : addZone
    Created on : 27 Oct, 2012, 2:11:09 PM
    Author     : santosh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="../common/script.jsp" %>
<script type="text/javaScript">
    var rules=new Array();
    rules[0]='masterZoneId|required|please select master zone'; 
    rules[1]='zoneCode|required|please enter zone code'; 
    rules[2]='zoneName|required|please enter zone name'; 
    rules[3]='zonePriority|required|please enter zone priority';
    rules[4]='zonePriority|numeric|please enter only numeric ';  
        
</script>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body onLoad="yav.init('form1',rules,'inline');">
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02" >
            <%@include file="../common/message.jsp" %>
            <form:form id="form1" modelAttribute="zone" action="addZone.htm" method="POST">
                <fieldset>
                    <legend><spring:message code="title.addZone"/></legend>
                    <table class="formTable">
                        <tr>
                            <td>Master zone code:<br/><form:select path="masterZoneId.masterZoneId" name="masterZoneId" id="masterZoneId" style="margin-bottom: 5px" class="userInputMedium">
                                    <form:option value="" label="-"></form:option>
                                    <form:options itemLabel="masterZoneCode" itemValue="masterZoneId" items="${masterZoneList}"></form:options>
                                </form:select>
                                <br><span id="errorsDiv_masterZoneId"></span></td>
                            <td><spring:message code="zoneCode"/>:<br/><form:input path="zoneCode" id="zoneCode" class="userInputLarge"/>
                                <br><span id="errorsDiv_zoneCode"></span></td>
                        </tr>

                        <tr>
                            <td><spring:message code="zoneName"/>:<br/><form:input path="zoneName" id="zoneName" class="userInputLarge"/>
                                <br><span id="errorsDiv_zoneName"></span></td>
                            <td><spring:message code="zonePriority"/>:<br/><form:input path="zonePriority" id="zonePriority" class="userInputLarge"/>
                                <br><span id="errorsDiv_zonePriority"></span></td>

                        </tr>

                        <tr>
                            <td><input type="button" name="Cancel" value="Cancel"  onclick="location.href='../zone/listZone.htm'"></td>                       
                            <td><input type="submit" name="btnSubmit" class="userInputFormSubmit" value="<spring:message code="button.Add"/>" onclick="return yav.performCheck('form1', rules, 'inline');"/></td>
                        </tr>
                    </table>

                    <spring:hasBindErrors name="zone">
                        <div class="error">
                            <form:errors path="*"/>
                        </div>
                    </spring:hasBindErrors>
                </fieldset>
            </form:form>
        </div>
    </body>
</html>

